package main

import (
	"go-glue.googlecode.com/hg/rlglue"
)

type MessageAgent struct {
	whichEpisode	int
	emptyAction	rlglue.Action
}

func (ea *MessageAgent) AgentInit(taskString string) {
	ea.whichEpisode = 0
	ea.emptyAction = rlglue.NewAction([]int32{}, []float64{}, []byte{})
}
func (ea *MessageAgent) AgentStart(obs rlglue.Observation) (act rlglue.Action) {
	return ea.emptyAction
}
func (ea *MessageAgent) AgentStep(reward float64, obs rlglue.Observation) (act rlglue.Action) {
	return ea.emptyAction
}
func (ea *MessageAgent) AgentEnd(reward float64) {
}
func (ea *MessageAgent) AgentCleanup() {
}
func (ea *MessageAgent) AgentMessage(message string) (reply string) {
	reply = message
	if message == "" {
		reply = "empty"
	}
	if message == "empty" {
		reply = ""
	}
	if message == "null" {
		reply = ""
	}
	return
}
func main() {
	if err := rlglue.LoadAgent(new(MessageAgent)); err != nil {
		panic(err)
	}
}
